/* GUI CONVERTED from rwdpiq.p (converter v1.75) Sat Aug 12 23:17:27 2000 */
/* rwdpiq.p - DEPARTMENT INQUIRY                                        */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/*V8:ConvertMode=Report                                                 */
/* Revision: 8.5       Created: 04/06/99     By: Jyoti Thatte  *J3CY*   */
/* Revision: 9.0      Modified: 05/04/99     By: Jean Miller   *M0CH*   */
/* Revision: 9.1      Modified: 10/01/99     By: Jeff Wootton  *N014*   */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00 BY: *N08T* Annasaheb Rahane */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00 BY: *N0KP* myb              */


         /* DISPLAY TITLE */

/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

         {mfdtitle.i "b+ "}

         define variable dept like dpt_dept no-undo.
         define variable desc1 like dpt_desc no-undo.

         
/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
            
 RECT-FRAME       AT ROW 1 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1 COLUMN 3 NO-LABEL VIEW-AS TEXT SIZE-PIXELS 1 BY 1
 SKIP(.1)  /*GUI*/
space(1)
            dept
            desc1  no-label
         with frame a side-labels width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER INITIAL "".
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:HIDDEN in frame a = yes.
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5.  /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



         /* SET EXTERNAL LABELS */
         setFrameLabels(frame a:handle).

/*M0CH*/ {wbrp01.i}

         repeat:
/*M0CH*/    if c-application-mode <> "WEB":U then
            set dept with frame a editing:

               /* FIND NEXT/PREVIOUS RECORD */
               {mfnp.i dpt_mstr dept dpt_dept dept dpt_dept dpt_dept}

               if recno <> ? then do:
                  assign
                     dept  = dpt_dept
                     desc1 = dpt_desc.
                  display dept desc1 with frame a.
               end. /* IF RECNO <> ? THEN */

            end. /* SET DEPT */

/*M0CH*/    {wbrp06.i &command = set &fields = "  dept" &frm = "a"}

/*M0CH*/    if (c-application-mode <> "WEB":U) or
/*M0CH*/       (c-application-mode = "WEB":U and
/*M0CH*/       (c-web-request begins "DATA":U))
/*M0CH*/    then do:

               status input.

               desc1 = "".
               find dpt_mstr where dpt_dept = dept no-lock no-error.
               if available dpt_mstr then desc1 = dpt_desc.
               display desc1 with frame a.
               hide frame b.

/*M0CH*/    end.

            /* SELECT PRINTER */
            {mfselprt.i "terminal" 80}
/*GUI*/ RECT-FRAME:HEIGHT-PIXELS in frame a = FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.


            for each dpt_mstr where dpt_dept >= dept
            no-lock with frame b width 80 no-attr-space:

               /* REPORT EXIT FOR PAGING */
               /* SET EXTERNAL LABELS */
               setFrameLabels(frame b:handle).
               
/*GUI*/ {mfguichk.i } /*Replace mfrpchk*/


               display
                  dpt_dept       colon 30 dpt_desc no-label
                  dpt_lbr_cap    colon 30
                  dpt_cop_acct   colon 30
/*N014*/          dpt_cop_sub    no-label
                  dpt_cop_cc     no-label
                  dpt_lbr_acct   colon 30
/*N014*/          dpt_lbr_sub    no-label
                  dpt_lbr_cc     no-label
                  dpt_bdn_acct   colon 30
/*N014*/          dpt_bdn_sub    no-label
                  dpt_bdn_cc     no-label
                  dpt_lvar_acc   colon 30
/*N014*/          dpt_lvar_sub   no-label
                  dpt_lvar_cc    no-label
                  dpt_lvrr_acc   colon 30
/*N014*/          dpt_lvrr_sub   no-label
                  dpt_lvrr_cc    no-label
                  dpt_bvar_acc   colon 30
/*N014*/          dpt_bvar_sub   no-label
                  dpt_bvar_cc    no-label
                  dpt_bvrr_acc   colon 30
/*N014*/          dpt_bvrr_sub   no-label
                  dpt_bvrr_cc    no-label skip(1)
               with frame b side-labels width 80 attr-space STREAM-IO /*GUI*/ .

            end. /* FOR EACH DPT_MSTR */

            /* RESET PRINTER/CLOSE OUTPUT */
            {mfreset.i}
/*GUI*/ {mfgrptrm.i} /*Report-to-Window*/


            /* DISPLAY MESSAGE */
            {mfmsg.i 8 1}

         end. /* END OF REPEAT */

/*M0CH*/ {wbrp04.i &frame-spec = a}
